package com.zc.topmod.enumer;

/**
 * @ClassName DisOutTireEnum
 * @Description 距离轮胎外侧距离枚举类
 * @Author zhucan
 * @Date 2019/01/31
 * @Version 1.0.0
 */

public enum DisOutTireEnum {

    DIS_0_4(0.4, "0.4m"),
    DIS_0_6(0.6, "0.6m"),
    DIS_0_8(0.8, "0.8m"),
    ;
    private Double key;
    private String value;

    private DisOutTireEnum(Double key, String value) {
        this.key = key;
        this.value = value;
    }

    public Double getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(Double key) {
        for (DisOutTireEnum enumer : DisOutTireEnum.values()) {
            if (enumer.getKey() == key) {
                return enumer.getValue();
            }
        }
        return null;
    }
}
